Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new inputs and select components #46812

Merged
merged 4 commits into from
Oct 3, 2024
Merged

Implement new inputs and select components #46812

merged 4 commits into from
Oct 3, 2024

Conversation

bl-nero
Copy link
Contributor

@bl-nero bl-nero commented Sep 20, 2024

This change:

  • Revamps the existing Input and FieldInput components
  • Revamps the existing Select* and FieldSelect* family of components, including unifying the set of accepted properties and supported features between the components of the family
  • Replaces the concept of "label tooltip" with "helper text" to better align with the UX dictionary and the actual placement of the helper text
  • Tweaks the existing UI in necessary places.

Figma: inputs, dropdowns

This is a large PR, so it's best to review it commit by commit. I decided to lump both input and select changes together, since they frequently appear together and testing these changes together saved a lot of time.

Screenshot 2024-09-20 at 18 28 59
Screenshot 2024-09-20 at 18 29 46
Screenshot 2024-09-20 at 18 30 25
Screenshot 2024-09-20 at 18 30 51
Screenshot 2024-09-20 at 18 31 50
Screenshot 2024-09-20 at 18 32 25

Caveats:

  • I took liberty to implement a small size for the select control, even though it wasn't designed, for consistency with inputs (and there was at least one place that required it).
  • There's still a separate implementation of SelectCreatable inside teleport/Discover/Shared/SelectCreatable, but I don't want to make this PR bigger than it already is.

Fixes #46611
Needs to be merged together with https://github.com/gravitational/teleport.e/pull/5052.

Tested by inspecting all storybook entries and making sure that layouts are fine and don't break when they show validation errors. A couple of screens were also tested on the real Web and Connect UI.

Note: since this PR is the largest and latest of the highly-visible UI changes, it bears the changelog line; however, this has been gradually introduced to v17 across a multitude of PRs. To see the entire development history, see all subissues of #37260.

Changelog: Refreshed the Web and Teleport Connect UI design.

Copy link
Contributor

@kimlisa kimlisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is pretty amazing stuff 🤩

fyi i didn't try clicking around the connect app

unified resource dropdowns gap:

image

are we okay with how we typically use the circle info icon as a hover tooltip and using it as a non hover tooltip icon in the input?

image

@bl-nero
Copy link
Contributor Author

bl-nero commented Oct 2, 2024

@kimlisa The dropdowns gap is a separate issue that has been introduced before this PR. As for the non-hover icons, they were designed this way, so any feedback should go to Kenny and Rishi. :)

@bl-nero
Copy link
Contributor Author

bl-nero commented Oct 2, 2024

@kiosion @ravicious @avatus Friendly ping

@avatus
Copy link
Contributor

avatus commented Oct 2, 2024

The dropdowns gap is a separate issue that has been introduced before this PR

do you know when it was introduced?

Copy link
Contributor

@avatus avatus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really nice! Will this be backported?

@bl-nero
Copy link
Contributor Author

bl-nero commented Oct 3, 2024

do you know when it was introduced?

@avatus Not yet.

@bl-nero
Copy link
Contributor Author

bl-nero commented Oct 3, 2024

Looks really nice! Will this be backported?

@avatus I didn't intend to backport this, as it (1) changes the look of the login dialog, and I'd like to reserve that for a major version upgrade, and (2) we want to maintain consistency with other design updates. I may backport the API change, similarly to how I backported the typography API changes without the actual design change before. I think the only change here is addition of the size attribute and renaming the label tip field to helper text.

@bl-nero bl-nero added this pull request to the merge queue Oct 3, 2024
Merged via the queue into master with commit 4543d0f Oct 3, 2024
39 checks passed
@bl-nero bl-nero deleted the bl-nero/inputs branch October 3, 2024 12:50
bl-nero added a commit that referenced this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement the new inputs
3 participants